home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Complete C196855172001.psc / Client / frmTools.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-05-13  |  5.5 KB  |  167 lines

  1. VERSION 5.00
  2. Begin VB.Form frmTools 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Remote System Tools"
  5.    ClientHeight    =   1695
  6.    ClientLeft      =   45
  7.    ClientTop       =   420
  8.    ClientWidth     =   4020
  9.    Icon            =   "frmTools.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   1695
  14.    ScaleWidth      =   4020
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   1  'CenterOwner
  17.    WhatsThisButton =   -1  'True
  18.    WhatsThisHelp   =   -1  'True
  19.    Begin VB.Frame fraSession 
  20.       Caption         =   "Affect Remote Session:"
  21.       BeginProperty Font 
  22.          Name            =   "Tahoma"
  23.          Size            =   8.25
  24.          Charset         =   0
  25.          Weight          =   400
  26.          Underline       =   0   'False
  27.          Italic          =   0   'False
  28.          Strikethrough   =   0   'False
  29.       EndProperty
  30.       Height          =   1605
  31.       Left            =   45
  32.       TabIndex        =   0
  33.       Tag             =   "2"
  34.       Top             =   60
  35.       Width           =   3930
  36.       Begin VB.CommandButton cmdExit 
  37.          Cancel          =   -1  'True
  38.          Caption         =   "&Cancel"
  39.          BeginProperty Font 
  40.             Name            =   "Tahoma"
  41.             Size            =   8.25
  42.             Charset         =   0
  43.             Weight          =   400
  44.             Underline       =   0   'False
  45.             Italic          =   0   'False
  46.             Strikethrough   =   0   'False
  47.          EndProperty
  48.          Height          =   390
  49.          Left            =   2835
  50.          TabIndex        =   5
  51.          Top             =   1080
  52.          Width           =   960
  53.       End
  54.       Begin VB.CommandButton cmdExecute 
  55.          Caption         =   "&Execute"
  56.          Default         =   -1  'True
  57.          BeginProperty Font 
  58.             Name            =   "Tahoma"
  59.             Size            =   8.25
  60.             Charset         =   0
  61.             Weight          =   400
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          Height          =   390
  67.          Left            =   1755
  68.          TabIndex        =   4
  69.          Top             =   1080
  70.          Width           =   1020
  71.       End
  72.       Begin VB.OptionButton optSession 
  73.          Caption         =   "Force the remote computer to shut down."
  74.          BeginProperty Font 
  75.             Name            =   "Tahoma"
  76.             Size            =   8.25
  77.             Charset         =   0
  78.             Weight          =   400
  79.             Underline       =   0   'False
  80.             Italic          =   0   'False
  81.             Strikethrough   =   0   'False
  82.          EndProperty
  83.          Height          =   225
  84.          Index           =   2
  85.          Left            =   180
  86.          TabIndex        =   3
  87.          Top             =   765
  88.          Value           =   -1  'True
  89.          Width           =   3375
  90.       End
  91.       Begin VB.OptionButton optSession 
  92.          Caption         =   "Force the remote computer to reboot."
  93.          BeginProperty Font 
  94.             Name            =   "Tahoma"
  95.             Size            =   8.25
  96.             Charset         =   0
  97.             Weight          =   400
  98.             Underline       =   0   'False
  99.             Italic          =   0   'False
  100.             Strikethrough   =   0   'False
  101.          EndProperty
  102.          Height          =   225
  103.          Index           =   1
  104.          Left            =   180
  105.          TabIndex        =   2
  106.          Top             =   540
  107.          Width           =   3375
  108.       End
  109.       Begin VB.OptionButton optSession 
  110.          Caption         =   "Force RemoteHost to log off current user."
  111.          BeginProperty Font 
  112.             Name            =   "Tahoma"
  113.             Size            =   8.25
  114.             Charset         =   0
  115.             Weight          =   400
  116.             Underline       =   0   'False
  117.             Italic          =   0   'False
  118.             Strikethrough   =   0   'False
  119.          EndProperty
  120.          Height          =   225
  121.          Index           =   0
  122.          Left            =   180
  123.          TabIndex        =   1
  124.          Top             =   315
  125.          Width           =   3375
  126.       End
  127.       Begin VB.Image Image1 
  128.          Height          =   480
  129.          Left            =   135
  130.          Picture         =   "frmTools.frx":000C
  131.          Top             =   1035
  132.          Width           =   480
  133.       End
  134.    End
  135. Attribute VB_Name = "frmTools"
  136. Attribute VB_GlobalNameSpace = False
  137. Attribute VB_Creatable = False
  138. Attribute VB_PredeclaredId = True
  139. Attribute VB_Exposed = False
  140. Option Explicit
  141. Private Sub cmdExecute_Click()
  142. On Error GoTo hell
  143. Dim iResult As Integer
  144. iResult = MsgBox(Warning, vbExclamation + vbYesNoCancel, "Affect Remote Session")
  145.     If iResult = vbYes Then
  146.         Select Case fraSession.Tag
  147.             Case 0
  148.                 frmConnection.objTCP.SendData "|LOG_OFF_CURRENT_USER|"
  149.             Case 1
  150.                 frmConnection.objTCP.SendData "|REBOOT_COMPUTER|"
  151.             Case 2
  152.                 frmConnection.objTCP.SendData "|PULL_THE_PLUG|"
  153.         End Select
  154.     ElseIf iResult = vbCancel Then
  155.     Unload Me
  156.     End If
  157. Exit Sub
  158. hell:
  159. MsgBox Error & ".", vbExclamation, "Error"
  160. End Sub
  161. Private Sub cmdExit_Click()
  162.     Unload Me
  163. End Sub
  164. Private Sub optSession_Click(Index As Integer)
  165.  Me.fraSession.Tag = Index
  166. End Sub
  167.